class Data {
  cellData (obj) {
    /*
    antv/X6节点参数
     */
    const data = {
      shape: 'vue-shape',
      width: 200,
      height: obj.nodeHeight,
      component: 'mod-node',
      ports: {
        groups: {
          out: {
            position: 'right',
            label: {
              position: 'right'
            },
            attrs: {
              circle: {
                r: 10,
                magnet: true,
                stroke: '#00bbec',
                strokeWidth: 6,
                fill: '#ffffff',
                style: {
                  visibility: obj.visibility
                }
              }
            }
          },
          in: {
            position: {
              name: 'absolute'
            },
            attrs: {
              circle: {
                r: 10,
                magnet: true,
                stroke: '#00bbec',
                strokeWidth: 6,
                fill: '#ffffff',
                style: {
                  visibility: obj.visibility
                }
              }
            }
          }
        },
        items: obj.nodePorts
      }
    }
    return data
  }
}
const DataStructure = new Data()
export default DataStructure
